Add missing avx512vl intrinsics for u32->f32 conversions - #2197
Conversation
|
r? @sayantn rustbot has assigned @sayantn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Can you rebase this? Our CI was broken when you opened the PR. |
| /// Documentation on them can be found in the [Intel Software Development Manual](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html). | ||
| #[inline] | ||
| #[target_feature(enable = "avx512f,avx512vl")] | ||
| #[unstable(feature = "stdarch_x86_avx512_vl_updates", issue = "158196")] |
There was a problem hiding this comment.
Can you make a proper tracking issue for these? Something similar to rust-lang/rust#153514.
Picking a more tightly scoped name like stdarch_x86_avx512_vl_f32_to_u32_conversions might be helpful when stabilizing.
849ba38 to
720458e
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Rebased without conflicts. Automatic verification fails because Intel Intrinsics Guide does not contain these intrinsics as of version 3.6.9. They are present in the Intel Software Development Manual and other sources, see rust-lang/rust#158196 for details. |
|
I think you can add them to |
|
Thank you for the guidance! I've added Intrinsics Guide XML check exception, opened the proper tracking issue and changed the stability annotations to point to it. CI is green. This should be ready to go now. |
|
Thank you! How do I mark the tracking issue as implemented? I don't think I can edit the labels on rust-lang/rust#161585 |
|
I've fixed it, but you can with |
Fixes rust-lang/rust#158196
Adds 6 intrinsics that were apparently forgotten by Intel and not included into the Intrinsics Guide web viewer, despite being present in the Intel Software Development Manual and implemented in clang. They all lower into a single hardware instruction and there is no other way to access that instruction; the AVX2 emulation is very costly compared to these native conversions.
The implementation mirrors both the existing 512-bit-wide form and the clang implementation for these 128-bit and 256-bit forms.
This is my first contribution so I have no idea what I'm doing. I don't know what the stabilization process for these would be and if these are supposed to be instantly stable or not, so I just made up a new unstable feature name.